﻿#region Using directives

using System;
using System.Collections.Generic;
using System.Text;

#endregion
using HTTPMsgAPI;

namespace Thinxoft.HttpLib
{
    public class ServerState : MarshalByRefObject
    {
        Settings settings;
        public void LoadSettings(ref Settings settings)
        {
            this.settings = settings;
        }

        public int ServerPort
        {
            get
            {
                return settings.Port;
            }
        }

        public HttpApplicationCollection Applications
        {
            get
            {
                return settings.HttpApplications;
            }
        }

        public Settings XedusSettings
        {
            get { return this.settings; }
        }

        public static void Log(string message, params string[] args)
        {
            System.Diagnostics.EventLog.WriteEntry("Xedus",string.Format("[{1}]{0}", string.Format(message, args),DateTime.Now));
        }

    }
}
